﻿<div class="blade-static __bottom">
    <button ng-click="saveChanges()" class="btn" ng-class="{'__disabled': formScope != undefined && formScope.$invalid}" ng-disabled="formScope != undefined && formScope.$invalid">
        <span>Create</span>
    </button>
</div>
<div class="blade-content">
    <div class="blade-inner">
        <div class="inner-block">
            <form class="form" name="detailForm">
                <div ng-init="setForm(detailForm)">
                    <label class="form-label">Code</label>
                    <div class="form-input">
                        <input ng-model="blade.currentEntity.id" type="text" placeholder="Enter code" required focus-on="">
                    </div>
                </div>
                <div class="form-group">
                    <label class="form-label">Name</label>
                    <div class="form-input">
                        <input ng-model="blade.currentEntity.name" type="text" placeholder="Enter name" required>
                    </div>
                </div>
                <div class="form-group">
                    <label class="form-label">Catalog</label>
                    <div class="form-input">
                        <ui-select ng-model="blade.currentEntity.catalog" required>
                            <ui-select-match placeholder="Select...">{{$select.selected.name}}</ui-select-match>
                            <ui-select-choices repeat="x.id as x in catalogs | filter: { name: $select.search }">
                                <span ng-bind-html="x.name | highlight: $select.search"></span>
                            </ui-select-choices>
                        </ui-select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="form-label">Default language</label>
                    <div class="form-input">
                        <ui-select ng-model="blade.currentEntity.defaultLanguage" required>
                            <ui-select-match placeholder="Select...">{{$select.selected}}</ui-select-match>
                            <ui-select-choices repeat="x in languages | filter: $select.search">
                                <span ng-bind-html="x | highlight: $select.search"></span>
                            </ui-select-choices>
                        </ui-select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="form-label">Default currency</label>
                    <div class="form-input">
                        <ui-select ng-model="blade.currentEntity.defaultCurrency" required>
                            <ui-select-match placeholder="Select...">{{$select.selected}}</ui-select-match>
                            <ui-select-choices repeat="x in currencies | filter: $select.search">
                                <span ng-bind-html="x | highlight: $select.search"></span>
                            </ui-select-choices>
                        </ui-select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="form-label">State</label>
                    <div class="form-input">
                        <ui-select ng-model="blade.currentEntity.storeState" required>
                            <ui-select-match placeholder="Select...">{{$select.selected}}</ui-select-match>
                            <ui-select-choices repeat="x in storeStates | filter: $select.search">
                                <span ng-bind-html="x | highlight: $select.search"></span>
                            </ui-select-choices>
                        </ui-select>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>